package TEXT06;

import java.util.Scanner;

/**
 * @Auther: zhang l
 * @Date: 2022/4/10 - 04 - 10 - 16:28
 * @Description: TEXT06
 * @version: 1.0
 */
public class penson {
    public static void main(String[] args) {
        int count=0;
        Scanner scanner=new Scanner(System.in);
        while (true){
            if(scanner.nextInt()<=0) break;
            if (!scanner.hasNextInt()) break;
            count++;
        }
        System.out.println(count);
    }
}
